﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SmartPlant.Model.Biz
{
    public class UnitTagConvention
    {
        #region 额外的

        public int startPos { get; set; } = 0;

        public string TAG_CONV_ATTR_REF { get; set; }

        public string name { set; get; }

        public int length { set; get; }

        public string pattern { set; get; }

        /// <summary>
        /// 单纯为分隔符。因为WPF端目前会将这个剥离出来
        /// </summary>
        public bool separator { set; get; } = false;

        #endregion 额外的

        public decimal TagConvId { get; set; }

        public decimal SEQ_NUM { get; set; }

        public decimal ProjId { get; set; }

        public decimal SiteId { get; set; }

        public decimal ChgNum { get; set; }

        public decimal PlantId { get; set; }

        public decimal AreaId { get; set; }

        public decimal UnitId { get; set; }

        public decimal TagConvTypeId { get; set; }

        public decimal TagConvAttrId { get; set; }

        public string ParmList { get; set; }

        public string ChgStatus { get; set; }

        public string UserName { get; set; }

        public DateTime? ChgDate { get; set; }

        public string UnitTagConvDesc { get; set; }

        public decimal? FuncParm1 { get; set; }
        /// <summary>
        /// 即每段的长度
        /// </summary>
        public decimal? FuncParm2 { get; set; }

        public decimal? TrimFlg { get; set; }

        public decimal? CondFlg { get; set; }

        private string _unitPreffix;

        public string UnitPreffix
        {
            get { return _unitPreffix; }
            set { _unitPreffix = value; }
        }

        public bool IsReadOnly { get; set; }

        public decimal? AttrLevelId { get; set; }

        public decimal? TagConvPartId { get; set; }

        public string AttrLevelType { get; set; }

        public decimal? TableId { get; set; }

        private string text = string.Empty;
        public string Text
        {
            get { return text; }
            set { text = value; }
        }
    }
}
